public class ArrayByIdea {
    public static void main(String[] args) {
        int[] a;
        a = new int[5];
        a[0] = 1;
        a[1] = 2;
        a[2] = 3;
        a[3] = 4;
        a[4] = 5;

        for (int i = 0; i < a.length; i++){
            System.out.print("a["+i+"]="+a[i]+" ");
        }
        System.out.print("\n---------------------------------\n");

        int b[] = {1,2,3,4,5};
        for (int i = 0; i < b.length; i++){
            System.out.print("b["+i+"]="+b[i]+" ");
        }
        System.out.print("\n---------------------------------\n");
        for (int x:b) {
            System.out.print("x="+x+" ");
        }
        System.out.print("\n---------------------------------\n");
    }
}
